package com.yhn.init.model.dto.hardware;

import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serial;
import java.io.Serializable;

/**
 * 五金信息
 *
 * @author yhnyhn123
 * @TableName hardware
 */
@Data
public class HardwareAddRequest implements Serializable {

    /**
     * 订单ID
     */
    @NotNull(message = "订单ID不能为空")
    private Long orderId;

    /**
     * 规格
     */
    @NotBlank(message = "五金规格不能为空")
    private String specification;

    /**
     * 品牌
     */
    @NotBlank(message = "五金品牌不能为空")
    private String brand;

    /**
     * 数量
     */
    @NotNull(message = "数量不能为空")
    @Min(value = 1, message = "数量必须大于0")
    private Integer quantity;

    /**
     * 特殊功能（输入）
     */
    private String special;


    @Serial
    private static final long serialVersionUID = 1L;
}
